/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.sql.Time;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 *
 * @author Adriano
 */
@Entity
@Table(name = "ticket_nao_aluno")
public class TicketNaoAluno implements Serializable{

    @Id
    @GeneratedValue
    private Long id;

    @ManyToOne
    @JoinColumn(name = "id_sessao", nullable = false)
    private Sessao sessao;    

    @ManyToOne
    @JoinColumn(name = "id_funcionario", nullable = false)
    private Funcionario funcionario;    
    
    private float preco = (float)5;
    private Time hora;

    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dataVenda;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Sessao getSessao() {
        return sessao;
    }

    public void setSessao(Sessao sessao) {
        this.sessao = sessao;
    }

    public Funcionario getFuncionario() {
        return funcionario;
    }

    public void setFuncionario(Funcionario funcionario) {
        this.funcionario = funcionario;
    }

    public float getPreco() {
        return preco;
    }

    public void setPreco() {
            preco = (float) 5;
    }

    public Date getData() {
        return dataVenda;
    }

    public void setData(Date dataVenda) {
        this.dataVenda = new Date();
    }

    
}
